<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html xmlns:th="http://www.thymeleaf.org">
<!--<![endif]-->
<!-- BEGIN HEAD -->

<head>
    <meta charset="utf-8" />
    <title>课程管理-课程列表</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="../superui/content/ui/global/bootstrap/css/bootstrap.min.css"
          th:href="@{/superui/content/ui/global/bootstrap/css/bootstrap.min.css}"/>
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../superui/content/ui/global/font-awesome/css/font-awesome.css"
          th:href="@{/superui/content/ui/global/font-awesome/css/font-awesome.css}"/>
    <!-- Theme style -->
    <link rel="stylesheet" href="../superui/content/adminlte/dist/css/AdminLTE.css"
          th:href="@{/superui/content/adminlte/dist/css/AdminLTE.css}"/>
    <link rel="stylesheet" href="../superui/content/adminlte/dist/css/skins/_all-skins.min.css"
          th:href="@{/superui/content/adminlte/dist/css/skins/_all-skins.min.css}"/>
    <link rel="stylesheet" href="../superui/content/min/css/supershopui.common.min.css"
          th:href="@{/superui/content/min/css/supershopui.common.min.css}"/>
    <link rel="stylesheet" href="../superui/content/plugins/bootstrap-table/bootstrap-table.css"
          th:href="@{/superui/content/plugins/bootstrap-table/bootstrap-table.css}"/>
    <link rel="stylesheet" href="../css/global.css"
          th:href="@{/css/global.css}"/>
    <!--全局通用框架样式 end-->
    <!-- iCheck -->
    <link rel="stylesheet" href="../superui/content/plugins/iCheck/square/blue.css"
          th:href="@{/superui/content/plugins/iCheck/square/blue.css}"/>
    <!-- 分页 -->
    <link rel="stylesheet" href="../js/assets/lib/pagination/pagination.css"
          th:href="@{/js/assets/lib/pagination/pagination.css}"/>
    <!-- iCheck -->
    <link rel="stylesheet" href="../superui/content/plugins/iCheck/square/blue.css"
          th:href="@{/superui/content/plugins/iCheck/square/blue.css}"/>
    <!--上传控件样式-->
    <link rel="stylesheet" href="../js/assets/lib/uploadify/uploadify.css"
          th:href="@{/js/assets/lib/uploadify/uploadify.css}"/>
    <style>
        .course-box .item{
            border-bottom: 1px solid #cccccc;
            padding-bottom: 10px;
            margin: 30px 0;
        }
        .course-box .item:last-child{
            border-bottom: none;
        }
        .course-box .item .course-img{
            width: 100%;
            height:128px;
            vertical-align: middle;
            text-align: center;
        }
        .course-box .item .course-img img{
            width: 100%;
            height:100%;
        }
        .course-box .item .title{
            /*font-size: 16px;*/
        }

        .course-box .item .hd{
            /*line-height: 47px;*/
        }
        .course-box .item .bd{
            font-size: 12px;
            margin: 10px 0;
        }

        .course-box .item .bd .col-md-4{
            margin-bottom: 6px;
        }

        .ft-btn {
            margin-left: 5px;
        }
        .ft-opt a{
            margin-left: 5px;
        }
        .price{    color: #F46344;}
        .btn-opt i{
            margin-right: 5px;
        }
    </style>
</head>
<body>
<section class="content-header">
    <h1>
        课程发布
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">课程管理</a></li>
        <li class="active">课程发布</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">

    <div class="row">
        <!-- BEGIN SAMPLE TABLE PORTLET-->
        <div class="col-md-12">
            <!-- BEGIN SAMPLE TABLE PORTLET-->
            <div class="box-body">
                <div class="panel panel-default no-margin">
                    <div class="panel-body search-box">
                        <form id="formSearch" class="form-horizontal">
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="txt_search_name" class="col-sm-4 control-label">课程名称：</label>
                                    <div class="col-sm-8">
                                        <input id="txt_search_name" name="name" class="form-control" type="text" value=""
                                               placeholder="请输入课程名称">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="txt_search_classType" class="col-sm-4 control-label">课程类型：</label>
                                    <div class="col-sm-8">
                                        <select id="txt_search_classType" name="classType" class="form-control">
                                            <option value="-1">全部</option>
                                            <option value="1">课外辅导</option>
                                            <option value="2">研学旅游</option>
                                            <option value="3">冬夏令营</option>
                                            <option value="4">在线课程</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="txt_search_courseGrade" class="col-sm-4 control-label">课程类型：</label>
                                    <div class="col-sm-8">
                                        <select id="txt_search_courseGrade" name="courseGrade" class="form-control">
                                            <option value="-1">全部</option>
                                            <option value="0">幼升小</option>
                                            <option value="1">一年级</option>
                                            <option value="2">二年级</option>
                                            <option value="3">三年级</option>
                                            <option value="4">四年级</option>
                                            <option value="5">五年级</option>
                                            <option value="6">六年级</option>
                                            <option value="7">小升初</option>
                                            <option value="8">初一</option>
                                            <option value="9">初二</option>
                                            <option value="10">初三</option>
                                            <option value="11">初升高</option>
                                            <option value="12">高一</option>
                                            <option value="13">高二</option>
                                            <option value="14">高三</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>
                                    <div class="col-sm-9">
                                        <button type="button" class="btn btn-default" id="btn-search" onclick="clickSearch()">
                                            <i class="fa  fa-search"></i>
                                            查询
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div id="userTableToolbar" class="mb-20">
                    <button id="btn_add" type="button" class="btn btn-primary">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>上架课程
                    </button>
                    <button id="btn_excel_import" type="button" class="btn btn-primary ft-btn">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>导入课程
                    </button>
                </div>
                <!--课程tab选项卡头-->
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">全部课程</a></li>
                        <li class=""><a href="#tab_1" data-toggle="tab">已上架</a></li>
                        <li class=""><a href="#tab_1" data-toggle="tab">已下架</a></li>
                    </ul>
                </div>
                <!--课程列表-->
                <div class="course-box" id="course-box">

                </div>

                <div class="loading-container"><div class="t-norecord"><i class="fa fa-file-o"></i><p>暂无数据记录</p></div></div>

                <div class="clearfix">
                    <div id="dt-data-pagination" class="pagination"></div>
                </div>

                <div id="courseInputDialog" class="hide">
                    <form id="frmMain" class="form-horizontal">
                        <div class="box-body" style="width: 99%">
                            <div class="form-group">
                                <label class="col-sm-3 control-label ">Excel表格</label>
                                <div class="col-sm-6">
                                    <input type="file" id="file_excel" name="file"/>
                                </div>
                                <div class="col-sm-3" style="line-height: 31px">
                                    <a href="#" id="excelDownload" style="font-size: x-small">下载模板</a>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label necessary"></label>
                                <span class="col-sm-9">请勿修改模板中表格格式！</span>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label "></label>
                                <div id="importMsg" class="col-sm-9" style="color:red;">导入成功</div>
                            </div>
                        </div>
                    </form>
                </div><!-- /.modal -->

            </div>

        </div>
    </div>
    <div id="vipUserItemsDialog">
        <div style="padding: 10px;">
            <div id="vipUserItemsTableToolbar" class="btn-group">

            </div>
            <table class="table-striped table-hover" id="vipUserItemsTable">

            </table>
        </div>

    </div>

</section>
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.2.3 -->
<script src="../../superui/content/ui/global/jQuery/jquery.min.js"
        th:src="@{/superui/content/ui/global/jQuery/jquery.min.js}"></script>
<!-- Bootstrap 3.3.6 -->

<script src="../../superui/content/ui/global/bootstrap/js/bootstrap.min.js"
        th:src="@{/superui/content/ui/global/bootstrap/js/bootstrap.min.js}"></script>
<!--supershopui-->
<script src="../../superui/content/min/js/supershopui.common.js"
        th:src="@{/superui/content/min/js/supershopui.common.js}"></script>

<!--bootstrap-table-->
<script src="../../superui/content/plugins/bootstrap-table/bootstrap-table.js"
        th:src="@{/superui/content/plugins/bootstrap-table/bootstrap-table.js}"></script>
<script src="../../superui/content/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js"
        th:src="@{/superui/content/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>
<script src="../../js/assets/common/bootstrap-table-object.js"
        th:src="@{/js/assets/common/bootstrap-table-object.js}"></script>
<!-- iCheck -->
<script src="../../superui/content/plugins/iCheck/icheck.min.js"
        th:src="@{/superui/content/plugins/iCheck/icheck.min.js}"></script>
<script src="../../js/assets/common/Feng.js"
        th:src="@{/js/assets/common/Feng.js}"></script>
<!-- 分页脚本-->
<script src="../../js/assets/lib/pagination/jquery.pagination.js"
        th:src="@{/js/assets/lib/pagination/jquery.pagination.js}"></script>
<!-- 模板引擎-->
<script src="../../js/assets/lib/artTemplate/template.js"
        th:src="@{/js/assets/lib/artTemplate/template.js}"></script>
<!-- 请求脚本-->
<script src="../../js/assets/common/ajax-util.js"
        th:src="@{/js/assets/common/ajax-util.js}"></script>
<!-- 公用脚本-->
<script src="../../js/assets/common/common.js"
        th:src="@{/js/assets/common/common.js}"></script>
<!--价格格式化-->
<script src="../../js/assets/lib/numeral/numeral.min.js"
        th:src="@{/js/assets/lib/numeral/numeral.min.js}"></script>
<!--上传控件-->
<script src="../../js/assets/lib/uploadify/jquery.uploadify.js"
        th:src="@{/js/assets/lib/uploadify/jquery.uploadify.js}"></script>
<!-- 用户脚本-->
<script src="./../js/course/list/list.js"
        th:src="@{/js/course/list/list.js}"></script>
<script src="./../js/course/list/vipuserItems.js"
        th:src="@{/js/course/list/vipuserItems.js}"></script>


<script  type="text/html" id="dataTmpl">
    {{each}}
    <div class="item clearfix row">
        <div class="col-md-2 mb-20">
            <!--<img class="course-img img-thumbnail" src="{{$value.picture1 | pictureFormat}}">-->
            <div class="course-img img-thumbnail"><img class="" src="{{$value.picture1 | pictureFormat}}"></div>
        </div>
        <div class="col-md-10">
            <div class="hd clearfix row no-margin">
                <div class="fl title">{{$value.courseName}}</div>
                <div class="fr txt-aln-r">
                    <button class="btn btn-info btn-opt btn-sm" onclick="editBtn('{{$value.id}}')">
                        <i class="glyphicon glyphicon-edit"></i>
                        <span>编辑</span>
                    </button>
                    <button class="btn btn-danger btn-opt btn-sm" onclick="deleteBtn('{{$value.id}}','{{$value.courseName}}')">
                        <i class="glyphicon glyphicon-trash"></i><span>课程下架</span>
                    </button>
                </div>
            </div>
            <div class="bd row mt-10 mb-10">
                <div class="col-md-4 no-padding">主讲老师：{{$value.teacherMain}}（发布者：{{$value.publishPerson}}）</div>
                <div class="col-md-4 no-padding">学管师/学管主任：{{$value.teacherHelp}}</div>
                <div class="col-md-4 no-padding">地点：{{$value.detailAddr}}</div>
                <div class="col-md-4 no-padding">分类：{{$value.classTypeName}}</div>
                <div class="col-md-4 no-padding">上课时间：{{$value.courseStartDate | dateFormat}} 至 {{$value.courseEndDate | dateFormat}}</div>
                <div class="col-md-4 no-padding">课程季：{{$value.courseSeason | courseSeasonFormat}}</div>
            </div>
            <div class="ft row no-margin">
                <div class="fl price">{{$value.coursePrice | coursePriceFormat}}元/{{$value.totalNumber}}节课</div>
                <div class="fr ft-opt">
                    <span class="label label-sm label-warning" style="cursor: pointer" onclick="viewItems('{{$value.id}}')">报名学员({{$value.signUpPersons || 0}} / {{$value.planClassPersons || 0}})</span>
                    {{#$value.courseStatus | courseStatusFormat}}
                </div>
            </div>
        </div>
    </div>
    {{/each}}
</script>
</body>
</html>